Hygienic Quasiquotation in Scheme Distilled Tutorial

نویسنده

  • Morten Rhiger
چکیده

Quasiquotation in Scheme is nearly ideal for implementing programs that generate other programs. These programs lack only the ability to generate fresh bound identifiers, as required to make such code-manipulating programs hygienic, but any Scheme programmer knows how to provide this ability using gensym. In this tutorial we investigate hygienic quasiquotation in Scheme and in languages influenced by Scheme. Stepping back from implementation issues, we first identify the source of the freshness condition in the semantics of a hygienic quasiquotation facility. We then show how gensym is needed to break a meta-circularity in interpreters and compilers for hygienic quasiquotation. Finally, following our recent work, we present a type system for hygienic quasiquotation that supports evaluation under dynamic λabstraction, manipulation of open code, a first-class eval function, and mutable state. This tutorial outlines Scheme programs implementing an interpreter, a compiler, and a macro for hygienic quasiquotation.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Quasiquotation in Lisp

Quasiquotation is the technology commonly used in Lisp to write program generating programs In this paper I will review the history and development of this technology and explain why it works so well in practice

متن کامل

Development and Usability Evaluation of an Online Tutorial for “How to Write a Proposal” for Medical Sciences Students

Background and Objective: Considering the importance of learning how to write a proposal for students, this study was performed to develop an online tutorial for “How to write a Proposal” for students and to evaluate its usability. Methods: This study is a developmental research and tool design. “Gamified Online Tutorial based on Self-Determination Theory (GOT-STD) Framework" became the basis f...

متن کامل

Magic Tutorial #S-1: The scheme command-line interpreter

Commands introduced in this tutorial: :scm-echo-result, :eval, lots of scheme functions Macros introduced in this tutorial: (None)

متن کامل

Fully-parameterized, first-class modules with hygienic macros

It is possible to define a formal semantics for configuration, elaboration, linking, and evaluation of fully-parameterized first-class modules with hygienic macros, independent compilation, and code sharing. This dissertation defines such a semantics making use of explicit substitution to formalize hygienic expansion and linking. In the module system, interfaces define the static semantics of m...

متن کامل

A tutorial on Quasi-experimental designs

A main step in answering a scientific hypothesis in an epidemiological study is deciding which type of study is suitable to be undertaken, considering methodology, practical considerations and budget and time limitations

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012